<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link rel="stylesheet" type="text/css" href="<?php echo $GLOBALS['base_path']?>public/css/style.css" media="screen" />
        <link rel="shortcut_icon" href="<?php echo $GLOBALS['base_path']?>public/img/icon.ico" />
		<link rel="icon" href="<?php echo $GLOBALS['base_path']?>public/img/icon.png" />
		<title>Foto</title>
        <script type="text/javascript" src="<?php echo $GLOBALS['base_path']?>public/js/fquery.js"></script>
    </head>
    <body>
        <div id="bodyWrapper">
                <?php $this->render('accountbar');?>
                <div class="dummy"></div>
                <?php $this->render('menubar');?>

                <div id="content">
                    <h2>Daftar Pengguna</h2>
                    <table>
                        <thead>
                            <tr>
                                <th>#</th>
                                <th>Username</th>
                                <th>Fullname</th>
                                <th>Aksi</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php foreach ($users as $user) :?>
                            <tr>
                                <td><?php echo $user->id;?></td>
                                <td><?php echo $user->username;?></td>
                                <td><?php echo $user->getProfileLink();?></td>
                                <td>
                                    <?php if ($user != $this->auth) : ?>
                                    <?php if ($user->enabled) : ?>
                                    <a href="<?php echo $this->createUrl("users_admin/inactivate/" . $user->id)?>">Non-aktifkan</a>
                                    <?php else : ?>
                                    <a href="<?php echo $this->createUrl("users_admin/activate/" . $user->id)?>">Aktifkan</a>
                                    <?php endif;?>
                                    <a href="<?php echo $this->createUrl("users_admin/reset/" . $user->id)?>">Kembalikan password</a>
                                    <?php endif;?>
                                </td>
                            </tr>
                            <?php endforeach;?>
                        </tbody>
                    </table>
                </div>
        </div>
    </body>

</html>